/****************************************************************************
**
****************************************************************************/

#ifndef BASEUIDATA_H
#define BASEUIDATA_H

#include <QList>
#include <QString>

class BaseUIData
{
public:
    BaseUIData();
    ~BaseUIData();

    /********************************************主页中的数据********************************************/

    QString text_home(int gunno) const;
    void set_text_home(int gunno, const QString& text);

    QString qrcode_home(int gunno) const;
    void set_qrcode_home(int gunno, const QString& qrcode);

    QString state_home(int gunno) const;
    void set_state_home(int gunno, const QString& state);

    quint8 net_state() const;
    void set_net_state(quint8 state);

    /********************************************刷卡页中的数据********************************************/

    QString qrcode_card() const;
    void set_qrcode_card(const QString& QRCard);

    QString info_card() const;
    void set_info_card(const QString& InfoCard);

    QString sn_card() const;
    void set_sn_card(const QString& sn_card);

    /****************识别页中的数据 - 就是提示正在启动充电...... 正在结束充电，不要拔枪...... 巴拉巴拉这些*********/

    QString info_identify() const;
    void set_info_identify(const QString& InfoIdentify);

    QString timeout_identify() const;
    void set_timeout_identify(const QString& TimeoutIdentify);

    /******************************************故障告警页中的数据******************************************/

    QString type_warning() const;
    void set_type_warning(const QString& TypeWarning);

    QString info_warning() const;
    void set_info_warning(const QString& InfoWarning);

    /********************************************充电中页的数据********************************************/

    QString image_charging() const;
    void set_image_charging(const QString& ImageCharging);

    QString sn_charging() const;
    void set_sn_charging(const QString& sn_charging);

    quint32 soc_charging() const;
    void set_soc_charging(quint32 SocCharging);

    quint32 cur_charging() const;
    void set_cur_charging(quint32 CurCharging);

    quint32 vol_charging() const;
    void set_vol_charging(quint32 VolCharging);

    quint32 elect_charging() const;
    void set_elect_charging(quint32 ElectCharging);

    quint32 time_charging() const;
    void set_time_charging(quint32 TimeCharging);

    quint32 remin_time_charging() const;
    void set_remin_time_charging(quint32 ReminTimeCharging);

    qint32 max_temp() const;
    void set_max_temp(qint32 maxTemp);

    quint32 max_vol() const;
    void set_max_vol(quint32 maxVol);

    quint32 demand_cur() const;
    void set_demand_cur(quint32 demandCur);

    quint32 demand_vol() const;
    void set_demand_vol(quint32 demandVol);

    /******************************************充电结束页中的数据******************************************/

    QString sn_chargend() const;
    void set_sn_chargend(const QString& sn_chargend);

    quint32 elect_chargend() const;
    void set_elect_chargend(quint32 ElectChargend);

    quint32 km_chargend() const;
    void set_km_chargend(quint32 KmChargend);

    quint32 time_chargend() const;
    void set_time_chargend(quint32 TimeChargend);

    quint32 soc_chargend() const;
    void set_soc_chargend(quint32 SocChargend);

    QString result_chargend() const;
    void set_result_chargend(const QString& resultChargend);

    /********************************************配置页中的数据********************************************/

    QString sys_config_info() const;
    void set_sys_config_info(const QString& sys_config_info);

    quint8 gun_main_positive_relay(int gunno) const;
    void set_gun_main_positive_relay(int gunno, quint8 data);

    quint8 gun_main_negative_relay(int gunno) const;
    void set_gun_main_negative_relay(int gunno, quint8 data);

    quint8 aps_positive_relay(int gunno) const;
    void set_aps_positive_relay(int gunno, quint8 data);

    quint8 aps_negative_relay(int gunno) const;
    void set_aps_negative_relay(int gunno, quint8 data);

    quint8 electronic_lock(int gunno) const;
    void set_electronic_lock(int gunno, quint8 data);

    quint8 gun_head_temp_feedback(int gunno) const;
    void set_gun_head_temp_feedback(int gunno, quint8 data);

    quint8 meter_feedback(int gunno) const;
    void set_meter_feedback(int gunno, quint8 data);

    quint8 gun_can_feedback(int gunno) const;
    void set_gun_can_feedback(int gunno, quint8 data);

    quint8 fan_feedback(int gunno) const;
    void set_fan_feedback(int gunno, quint8 data);

    quint8 contactor_relay() const;
    void set_contactor_relay(quint8 contactor_relay);

    quint8 model_parallel_main_positive_relay() const;
    void set_model_parallel_main_positive_relay(quint8 model_parallel_main_positive_relay);

    quint8 model_parallel_main_negative_relay() const;
    void set_model_parallel_main_negative_relay(quint8 model_parallel_main_negative_relay);

    quint8 model_can_feedback() const;
    void set_model_can_feedback(quint8 model_can_feedback);

    quint8 estop_feedback() const;
    void set_estop_feedback(quint8 estop_feedback);

    quint8 access_control_feedback() const;
    void set_access_control_feedback(quint8 access_control_feedback);

    quint8 led_feedback() const;
    void set_led_feedback(quint8 led_feedback);

    quint8 card_feedback() const;
    void set_card_feedback(quint8 card_feedback);

    QString local_update_info() const;
    void set_local_update_info(const QString& local_update_info);

    /********************************************升级页中的数据********************************************/

    double update_progress() const;
    void set_update_progress(double updateProgress);

protected:

private:
    /********************************************主页中的数据********************************************/

    QList<QString> text_home_ = {"", ""};
    QList<QString> qrcode_home_ = {"", ""};
    QList<QString> state_home_ = {"", ""};
    quint8 net_state_ = 0;

    /********************************************刷卡页中的数据********************************************/

    QString qrcode_card_ = "";
    QString info_card_ = "";
    QString sn_card_ = "";

    /****************识别页中的数据 - 就是提示正在启动充电...... 正在结束充电，不要拔枪...... 巴拉巴拉这些*********/

    QString info_identify_ = "";
    QString timeout_identify_ = "";

    /******************************************故障告警页中的数据******************************************/

    QString type_fault_ = "";
    QString info_fault_ = "";

    /********************************************充电中页的数据********************************************/

    QString image_charging_ = "";
    QString sn_charging_ = "";
    quint32 soc_charging_ = 0;
    quint32 cur_charging_ = 0;
    quint32 vol_charging_ = 0;
    quint32 elect_charging_ = 0;
    quint32 charge_time_charging_ = 0;
    quint32 remin_time_charging_ = 0;
    qint32  max_temp_charging_ = 0;
    quint32 max_vol_charging_ = 0;
    quint32 demand_cur_charging_ = 0;
    quint32 demand_vol_charging_ = 0;

    /******************************************充电结束页中的数据******************************************/

    QString sn_chargend_;
    quint32 soc_chargend_ = 0;
    quint32 elect_chargend_ = 0;
    quint32 time_chargend_ = 0;
    quint32 km_chargend_ = 0;
    QString result_chargend_;

    /********************************************配置页中的数据********************************************/

    QString sys_config_info_;                              //
    QList<quint8> gun_main_positive_relay_ = {0x00, 0x00}; //枪直流主正继电器
    QList<quint8> gun_main_negative_relay_ = {0x00, 0x00}; //枪直流主负继电器
    QList<quint8> aps_positive_relay_ = {0x00, 0x00};      //辅助电源投切继电器（正）
    QList<quint8> aps_negative_relay_ = {0x00, 0x00};      //辅助电源投切继电器（负）
    QList<quint8> electronic_lock_ = {0x00, 0x00};         //枪电子锁
    QList<quint8> gun_head_temp_feedback_ = {0x00, 0x00};  //枪头温度反馈
    QList<quint8> meter_feedback_ = {0x00, 0x00};          //电表 485
    QList<quint8> gun_can_feedback_ = {0x00, 0x00};        //枪 CAN
    QList<quint8> fan_feedback_ = {0x00, 0x00};            //枪风机
    quint8 contactor_relay_ = 0x00;                        //交流接触器继电器
    quint8 model_parallel_main_positive_relay_ = 0x00;     //模块并联主正 继电器
    quint8 model_parallel_main_negative_relay_ = 0x00;     //模块并联 主负继电器
    quint8 model_can_feedback_ = 0x00;                     //模块 CAN
    quint8 estop_feedback_ = 0x00;                         //急停信号采集
    quint8 access_control_feedback_ = 0x00;                //门禁
    quint8 led_feedback_ = 0x00;                           //灯板输出信号反馈
    quint8 card_feedback_ = 0x00;                          //读卡器
    QString local_update_info_;                            //Local Update data

    /********************************************升级页中的数据********************************************/

    double progress_update_ = 0.0;
};

#endif // BASEUIDATA_H
